#!/bin/sh
INSTALLPREFIX=/usr/local

echo "=== Building libcow ==="
mkdir libcow/build
cd libcow/build
cmake ..
make
cd ../../

echo "=== libcow built ==="

echo "=== Building cow_player ==="

mkdir cow_player/build
cd cow_player/build
cmake ..
make

echo "=== cow_player built ==="

cd ../../

echo "=== Installing libcow and cow_player in $INSTALLPREFIX === "

cp -R libcow/include/* $INSTALLPREFIX/include
cp libcow/bin/libcowd.so $INSTALLPREFIX/lib
cp cow_player/build/cow_player $INSTALLPREFIX/bin

echo "=== Done! ==="